package com.common.dingding.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.common.dingding.entity.User;
import com.common.dingding.mapper.UserMapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user")
@Tag(name = "用户管理", description = "用户相关的CRUD操作")
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @GetMapping("/list")
    @Operation(summary = "获取用户列表", description = "查询所有用户信息")
    public List<User> list() {
        return userMapper.selectList(null);
    }
}